﻿using System.Web.Mvc;


namespace Wayloop.Web.Mvc.Extensions
{
    public static class ControllerExtensions
    {
        /// <summary>
        /// Sets the HTTP status code.
        /// </summary>
        /// <param name="controller">The <see cref="Controller"/> instance.</param>
        /// <param name="statusCode">The HTTP status code.</param>
        public static void SetHttpStatusCode(this Controller controller, int statusCode)
        {
            controller.HttpContext.Response.StatusCode = statusCode;
        }
    }
}